package com.eye.catcher.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author huzhiwei
 * @since 2022-02-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class TSysDaUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("ID")
    private String id;

    /**
     * 编码
     */
    @TableField("CODE")
    private String code;

    /**
     * 登录名
     */
    @TableField("LOGIN_NAME")
    private String loginName;

    /**
     * 密码
     */
    @TableField("PASSWORD")
    private String password;

    /**
     * 中文名
     */
    @TableField("USER_NAME")
    private String userName;

    /**
     * 创建年份
     */
    @TableField("CREATE_YEAR")
    private Integer createYear;

    /**
     * 创建人ID
     */
    @TableField("CREATE_USER_ID")
    private String createUserId;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("CREATE_TIME")
    private LocalDateTime createTime;

    /**
     * 更新人ID
     */
    @TableField("UPDATE_USER_ID")
    private String updateUserId;

    /**
     * 更新时间
     */
    @TableField("UPDATE_TIME")
    private LocalDateTime updateTime;

    /**
     * 上一个密码
     */
    @TableField("PREV_PASSWORD")
    private String prevPassword;

    /**
     * 版本
     */
    @TableField("VERSION")
    private String version;

    /**
     * 性别 0-男，1-女
     */
    @TableField("SEX")
    private String sex;

    /**
     * 邮箱
     */
    @TableField("EMAIL")
    private String email;

    /**
     * 手机号
     */
    @TableField("PHONE")
    private String phone;

    /**
     * 职务
     */
    @TableField("POSITION")
    private String position;
    /**
     * 来源
     */
    @TableField("SOURCE")
    private String source;
    /**
     *  用户状态：0不可用，1可用
     */
    @TableField(value = "STATUS",fill = FieldFill.INSERT)
    private String status;

    @TableField("FLAG")
    private String flag;

    @TableField("TAG")
    private String tag;

    @TableField("REMARK")
    private String remark;

    @TableField("UNIT_ID")
    private String unitId;
    @TableField("UNIT_CODE")
    private String unitCode;
    @TableField("UNIT_NAME")
    private String unitName;
    @TableField("BASE_ID")
    private Integer baseId;
    @TableField("BASE_CODE")
    private String baseCode;
    @TableField("BASE_NAME")
    private String baseName;

    @TableField(exist = false)
    private String roleIds;

    @TableField(exist = false)
    private String roleNames;


    public TSysDaUser() {
    }

    public TSysDaUser(String id, String code, String loginName, String password, String userName, Integer createYear, String createUserId, LocalDateTime createTime, String version, String sex, String email, String phone, String position, String source, String status, String unitName, Integer baseId, String baseCode, String baseName) {
        this.id = id;
        this.code = code;
        this.loginName = loginName;
        this.password = password;
        this.userName = userName;
        this.createYear = createYear;
        this.createUserId = createUserId;
        this.createTime = createTime;
        this.version = version;
        this.sex = sex;
        this.email = email;
        this.phone = phone;
        this.position = position;
        this.source = source;
        this.status = status;
        this.unitName = unitName;
        this.baseId = baseId;
        this.baseCode = baseCode;
        this.baseName = baseName;
    }
}
